import pandas as pd


def pandas_define():
    # 方式一: 等长度列表的数组
    data = {"name": ["小明", "小红", "小蓝"], "age": [18, 19, 20], "height": [188, 189, 160]}
    frame = pd.DataFrame(data)
    print(frame)
    # 方式二：嵌套字典
    data2 = {"name": {"one": "小明", "two": "小红", "three": "小蓝"},
             "age": {"one": 18, "two": 19, "three": 20},
             "height": {"one": 188, "two": 189, "three": 160}
             }
    frame2 = pd.DataFrame(data2)
    print(frame2)


if __name__ == '__main__':
    pandas_define()
